package com.hp.dao;

import com.hp.entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserDao {
    //查询所有
    public List<User> findAll();
   //添加
    public void addUser(User user);
  //检查用户名是否重复
    public User findByUserName(String username);
  //通过id查询对象
    public User findById(int id);

    public void authRole(@Param("userid") int userid, @Param("roleid") int roleid);

    public User findByUsernameAndPassword(User user);

    int updatePwd(User user);
}
